package com.liaoyifan.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum AuthCodeEnum implements ICodeEnum {

    /*--------------- 认证业务码 11XX ---------------*/
    HEADER_MISSING_AUTHENTICATION(
            1100, "{com.liaoyifan.core.enums.AuthCodeEnum.HEADER_MISSING_AUTHENTICATION.message}"),
    ACCESS_TOKEN_INVALID(
            1101, "{com.liaoyifan.core.enums.AuthCodeEnum.ACCESS_TOKEN_INVALID.message}"),
    REFRESH_TOKEN_INVALID(
            1102, "{com.liaoyifan.core.enums.AuthCodeEnum.REFRESH_TOKEN_INVALID.message}"),
    INSUFFICIENT_PERMISSIONS(
            1103, "{com.liaoyifan.core.enums.AuthCodeEnum.INSUFFICIENT_PERMISSIONS.message}"),
    ;

    private final int code;
    private final String message;

    static {
        ICodeEnum.unique(values());
    }
}
